package com.llt.chatroom.service;

import com.llt.chatroom.mapper.UserMapper;
import com.llt.chatroom.model.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserService {

    @Resource
    UserMapper userMapper;

//    通过名字查询用户
    public User selectByName(String username) {
        return userMapper.selectByName(username);
    }


//    添加用户
    public int insert(User user) {
        return userMapper.insert(user);
    }

}
